package com.nulldev.util.net.packets.generic;

import com.nulldev.util.net.packets.APILevel;
import com.nulldev.util.net.packets.NetInfo;
import com.nulldev.util.net.packets.PacketManager;
import com.nulldev.util.net.packets.UniversalPacket;
import com.nulldev.util.other.BooleanUtil;

@APILevel(level = 1)
public class SDTPSupported extends UniversalPacket {

	public SDTPSupported() {
		super("SDTP: Is Supported?", "sdtp.supported", "false");
	}

	@Override
	public void client(byte[] data, byte[] raw, final NetInfo client) {
	}

	@Override
	public void server(byte[] data, byte[] raw, NetInfo connection) {
		connection.sendBlocking(PacketManager.fromID(
				"sdtp.supported", BooleanUtil.toBinary(connection.isSDTPSupported())));
	}

}
